package com.tueye.service.impl.userblog;

import java.util.List;
import java.util.Map;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.beans.factory.annotation.Qualifier;
import org.springframework.context.annotation.Scope;
import org.springframework.stereotype.Component;

import com.tueye.base.util.BaseService;
import com.tueye.base.util.Page;
import com.tueye.dao.userblog.IUserBlogDao;
import com.tueye.entity.user.GoodFriend;
import com.tueye.entity.user.User;
import com.tueye.entity.user.UserBlogInfo;
import com.tueye.service.exception.TuEyeServiceException;
import com.tueye.service.userblog.IUserBlogService;
/**
 * 
 * @author hanxiaowei
 *
 */

@Scope("prototype")
@Component("userBlogService")
public class UserBlogServiceImpl extends BaseService implements IUserBlogService {
	
	@Autowired
	@Qualifier("userBlogDao")
	private IUserBlogDao userBlogDao;
	
	@Override
	public UserBlogInfo getUserBlogInfo(String id) throws TuEyeServiceException {

		return userBlogDao.getUserBlogInfo(id);
	}

	@Override
	public Page pagedQueryByHQL(String userid, int pageNo, int pageSize,
			Object... values) throws TuEyeServiceException {

		return userBlogDao.pagedQueryByHQL(userid, pageNo, pageSize, values);
	}

	@Override
	public User getUserById(String userid) throws TuEyeServiceException {
		
		return userBlogDao.getUserById(userid);
	}

	@Override
	public Map getFlowerNum(String userid) throws TuEyeServiceException {
		
		return userBlogDao.getFlowerNum(userid);
	}

	@Override
	public List getGoodFriendToUserInfo(String userid)
			throws TuEyeServiceException {
		return userBlogDao.getGoodFriendToUserInfo(userid);
	}

	@Override
	public void saveGoodFriend(GoodFriend goodFriend)
			throws TuEyeServiceException {
		this.userBlogDao.saveGoodFriend(goodFriend);
		
	}

	@Override
	public String isGoodFriend(String userid) throws TuEyeServiceException {
		// TODO Auto-generated method stub
		return this.userBlogDao.isGoodFriend(userid);
	}

}
